/// examTitle : "11"
/// data : [{"titleType":1,"answerToBeSelected":{"A":"11","B":"11321","C":"22","D":"312"},"userAnswer":"","id":"1844659718870761568","title":"1,(单选题)  111"}]
/// sum : 1
/// isFinish : false

class QUestionnaireDetailDto {
  QUestionnaireDetailDto({
      String? examTitle, 
      List<Data>? data, 
      num? sum, 
      bool? isFinish,}){
    _examTitle = examTitle;
    _data = data;
    _sum = sum;
    _isFinish = isFinish;
}

  QUestionnaireDetailDto.fromJson(dynamic json) {
    _examTitle = json['examTitle'];
    if (json['data'] != null) {
      _data = [];
      json['data'].forEach((v) {
        _data?.add(Data.fromJson(v));
      });
    }
    _sum = json['sum'];
    _isFinish = json['isFinish'];
  }
  String? _examTitle;
  List<Data>? _data;
  num? _sum;
  bool? _isFinish;
QUestionnaireDetailDto copyWith({  String? examTitle,
  List<Data>? data,
  num? sum,
  bool? isFinish,
}) => QUestionnaireDetailDto(  examTitle: examTitle ?? _examTitle,
  data: data ?? _data,
  sum: sum ?? _sum,
  isFinish: isFinish ?? _isFinish,
);
  String? get examTitle => _examTitle;
  List<Data>? get data => _data;
  num? get sum => _sum;
  bool? get isFinish => _isFinish;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['examTitle'] = _examTitle;
    if (_data != null) {
      map['data'] = _data?.map((v) => v.toJson()).toList();
    }
    map['sum'] = _sum;
    map['isFinish'] = _isFinish;
    return map;
  }

}

/// titleType : 1
/// answerToBeSelected : {"A":"11","B":"11321","C":"22","D":"312"}
/// userAnswer : ""
/// id : "1844659718870761568"
/// title : "1,(单选题)  111"

class Data {
  Data({
      num? titleType,
      Map? answerToBeSelected,
      String? userAnswer, 
      String? id, 
      String? title,}){
    _titleType = titleType;
    _answerToBeSelected = answerToBeSelected;
    _userAnswer = userAnswer;
    _id = id;
    _title = title;
}

  Data.fromJson(dynamic json) {
    _titleType = json['titleType'];
    _answerToBeSelected = json['answerToBeSelected'] != null ? json['answerToBeSelected'] : null;
    _userAnswer = json['userAnswer'];
    _id = json['id'];
    _title = json['title'];
  }
  num? _titleType;
  Map? _answerToBeSelected;
  String? _userAnswer;
  String? _id;
  String? _title;
Data copyWith({  num? titleType,
  Map? answerToBeSelected,
  String? userAnswer,
  String? id,
  String? title,
}) => Data(  titleType: titleType ?? _titleType,
  answerToBeSelected: answerToBeSelected ?? _answerToBeSelected,
  userAnswer: userAnswer ?? _userAnswer,
  id: id ?? _id,
  title: title ?? _title,
);
  num? get titleType => _titleType;
  Map? get answerToBeSelected => _answerToBeSelected;
  String? get userAnswer => _userAnswer;
  String? get id => _id;
  String? get title => _title;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['titleType'] = _titleType;
    if (_answerToBeSelected != null) {
      map['answerToBeSelected'] = _answerToBeSelected;
    }
    map['userAnswer'] = _userAnswer;
    map['id'] = _id;
    map['title'] = _title;
    return map;
  }

}

